import dayjs from "dayjs";
import { ref } from "vue";

export default function usePresetDatePicker() {
    const presets = ref([
        {
            label: "昨天",
            value: [dayjs().subtract(1, "day"), dayjs().subtract(1, "day")],
        },
        {
            label: "今天",
            value: [dayjs(), dayjs()],
        },
        {
            label: "过去7天",
            value: [dayjs().subtract(7, "day"), dayjs().subtract(1, "day")],
        },
        {
            label: "过去30天",
            value: [dayjs().subtract(30, "day"), dayjs().subtract(1, "day")],
        },
    ]);
    return presets;
}
